package com.appwoo.txtws.component;

import android.content.ContentValues;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import com.appwoo.txtws.bean.FlowBean;
import com.appwoo.txtws.bean.OpBean;
import java.io.File;
import java.io.FileOutputStream;
import java.util.ArrayList;

public class MyHelper
{
  private static File f;
  private static FileOutputStream fos;
  private static boolean isPass = false;
  public static boolean isUseDB = false;
  private static SQLiteDatabase mysql;

  public static int delData(String paramString)
  {
    return -1;
  }

  public static boolean fileCheck()
  {
    isPass = false;
    return isPass;
  }

  public static long insertData(String paramString1, String paramString2)
  {
    return -1L;
  }

  public static long insertLog(String paramString1, String paramString2)
  {
    return -1L;
  }

  public static ArrayList<FlowBean> queryData(String paramString1, String paramString2)
  {
    return new ArrayList();
  }

  public static ArrayList<OpBean> queryLog(String paramString1, String paramString2)
  {
    ArrayList localArrayList = new ArrayList();
    if (fileCheck())
      mysql = SQLiteDatabase.openOrCreateDatabase(f, null);
    try
    {
      Cursor localCursor = mysql.query("logs", null, "isupload = '" + paramString1 + "' and " + "user" + " = '" + paramString2 + "'", null, null, null, null);
      while (true)
      {
        if (!localCursor.moveToNext())
        {
          localCursor.close();
          return localArrayList;
        }
        OpBean localOpBean = new OpBean();
        localOpBean.setId(localCursor.getString(0));
        localOpBean.setOpdesc(localCursor.getString(localCursor.getColumnIndexOrThrow("opdesc")));
        localOpBean.setUpTime(localCursor.getString(localCursor.getColumnIndexOrThrow("time")));
        localArrayList.add(localOpBean);
      }
    }
    catch (Exception localException)
    {
      Logger.e("xjf", "MyHelper:" + localException.toString());
      return localArrayList;
    }
    finally
    {
      if (mysql != null)
        mysql.close();
    }
  }

  public static long updateData(String paramString1, String paramString2)
  {
    return -1L;
  }

  public static long updateLog(String paramString1, String paramString2)
  {
    long l = -1L;
    if (fileCheck())
      mysql = SQLiteDatabase.openOrCreateDatabase(f, null);
    try
    {
      ContentValues localContentValues = new ContentValues();
      localContentValues.put("isupload", paramString1);
      int i = mysql.update("logs", localContentValues, "_id=" + paramString2, null);
      l = i;
      return l;
    }
    catch (Exception localException)
    {
      Logger.e("xjf", "MyHelper  updateLog:" + localException.toString());
      return l;
    }
    finally
    {
      if (mysql != null)
        mysql.close();
    }
  }
}

/* Location:           C:\Documents and Settings\Administrator\classes_dex2jar.jar
 * Qualified Name:     com.appwoo.txtws.component.MyHelper
 * JD-Core Version:    0.6.2
 */